package com.ziyun.erp.modules.business.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.ziyun.erp.modules.business.entity.GoodsPushEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 商品搜索推荐表
 * 
 * @author jiangli
 * @email 
 * @date 2018-12-18 17:16:31
 */
public interface GoodsPushDao extends BaseMapper<GoodsPushEntity> {

    List<GoodsPushEntity> list (@Param("page")Pagination page, @Param("map")Map<String, Object> map);

    @Select("SELECT a.*,b.name FROM goods_push a LEFT JOIN goods b USING(goods_id) WHERE a.`goods_id`=#{goodsId}")
    GoodsPushEntity findOne(Long goodsId);
	
}
